﻿@model Campus.Entities.Estudiante

<div class="control-group">
	<div class="control-label">
	    @Html.LabelFor(model => model.Nombre)
	</div>
	<div class="controls">
		@Html.EditorFor(model => model.Nombre)
		@Html.ValidationMessageFor(model => model.Nombre)
	</div>
</div>

<div class="control-group">
	<div class="control-label">
	    @Html.LabelFor(model => model.Apellido)
	</div>
	<div class="controls">
		@Html.EditorFor(model => model.Apellido)
		@Html.ValidationMessageFor(model => model.Apellido)
	</div>
</div>

<div class="control-group">
	<div class="control-label">
	    @Html.LabelFor(model => model.DNI)
	</div>
	<div class="controls">
		@Html.EditorFor(model => model.DNI)
		@Html.ValidationMessageFor(model => model.DNI)
	</div>
</div>

<div class="control-group">
	<div class="control-label">
	    @Html.LabelFor(model => model.FechaNacimiento)
	</div>
	<div class="controls">
		@Html.EditorFor(model => model.FechaNacimiento)
		@Html.ValidationMessageFor(model => model.FechaNacimiento)
	</div>
</div>

<div class="control-group">
	<div class="control-label">
	    @Html.LabelFor(model => model.Email)
	</div>
	<div class="controls">
		@Html.EditorFor(model => model.Email)
		@Html.ValidationMessageFor(model => model.Email)
	</div>
</div>

<div class="control-group">
	<div class="control-label">
        @Html.LabelFor(model => model.ObraSocial)
    
</div>
<div class="controls">
    @Html.DropDownListFor(model => model.ObraSocialId, ((IEnumerable<Campus.Entities.ObraSocial>)ViewBag.PossibleObraSocials).OrderBy(o=>o.Nombre.ToLower()).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Nombre), 
        Value = option.ObraSocialId.ToString(),
        Selected = (Model != null) && (option.ObraSocialId == Model.ObraSocialId)
    }), "Elegir...")
    @Html.ValidationMessageFor(model => model.ObraSocialId)
</div>
</div>
<div class="control-group">
	<div class="control-label">
    @Html.LabelFor(model => model.Escuela)
</div>
<div class="controls">
    @Html.DropDownListFor(model => model.EscuelaId, ((IEnumerable<Campus.Entities.Escuela>)ViewBag.PossibleEscuelas).OrderBy(e=>e.Nombre.ToLower()).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Nombre), 
        Value = option.EscuelaId.ToString(),
        Selected = (Model != null) && (option.EscuelaId == Model.EscuelaId)
    }), "Elegir...")
    @Html.ValidationMessageFor(model => model.EscuelaId)
</div>
</div>

<div class="control-group">
	<div class="control-label">
	    @Html.LabelFor(model => model.Foto)
	</div>
	<div class="controls">		                                           
        <input type="file" name="fileFotoEstudiantes" style="width:100%" />
		@Html.ValidationMessageFor(model => model.Foto)
	</div>
</div>
